
import { SELECT_NODE, UNSELECT_NODE } from '../actions/DESGIN'

//全局编辑状态的代码
export const selectedCode = (state = "", action) => {
    //console.log(action,'action');
    switch (action.type) {
        case SELECT_NODE:
            return action.code;
        case UNSELECT_NODE:
            return "";
        default:
            return state;
    }
}



